package com.kelvin.paopao.injector.modules;

import com.kelvin.kelvinlib.db.dao.DaoSession;
import com.kelvin.paopao.adapter.PersonPhotoAdapter;
import com.kelvin.paopao.adapter.PersonPhotoImageAdapter;
import com.kelvin.paopao.injector.PerActivity;
import com.kelvin.paopao.module.person.detail.IPersonDetailPresenter;
import com.kelvin.paopao.module.person.detail.PersonDetailActivity;
import com.kelvin.paopao.module.person.detail.PersonDetailPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * Created by MCK on 2017/5/9.
 */

@Module
public class PersonDetailModule {
    private PersonDetailActivity mView;

    public PersonDetailModule(PersonDetailActivity view) {
        this.mView = view;
    }

    @PerActivity
    @Provides
    public IPersonDetailPresenter providerPresenter(DaoSession daoSession) {
        return new PersonDetailPresenter(mView, daoSession);
    }

    @PerActivity
    @Provides
    public PersonPhotoAdapter providerAdapter() {
        return new PersonPhotoAdapter(mView);
    }
}
